package com.chinamobile.iot.mqtt.spi.model;

/**
 * Created by szl on 2017/7/31.
 */
public class Tree1Client {
    private String clientId;
    private boolean cleanSession;

    public Tree1Client() {
    }

    public Tree1Client(String clientId, boolean cleanSession) {
        this.clientId = clientId;
        this.cleanSession = cleanSession;
    }

    public String getClientId() {
        return clientId;
    }

    public void setClientId(String clientId) {
        this.clientId = clientId;
    }

    public boolean isCleanSession() {
        return cleanSession;
    }

    public void setCleanSession(boolean cleanSession) {
        this.cleanSession = cleanSession;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Tree1Client that = (Tree1Client) o;

        return clientId.equals(that.clientId);
    }

    @Override
    public int hashCode() {
        return clientId.hashCode();
    }

    @Override
    public String toString() {
        return "Tree1Client{" +
                "clientId='" + clientId + '\'' +
                ", cleanSession=" + cleanSession +
                '}';
    }
}
